/**
 * Copyright (C) 2010 Cloudfarming <info@cloudfarming.nl>
 *
 * Licensed under the Eclipse Public License - v 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.eclipse.org/legal/epl-v10.html
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*
 * SceneTestFrame.java
 *
 * Created on Jun 3, 2011, 3:10:25 PM
 */
package nl.cloudfarming.client.geoviewer;

import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import nl.cloudfarming.client.geoviewer.edit.GeoEditorController;
import nl.cloudfarming.client.geoviewer.edit.GeoEditorTopComponent;
import nl.cloudfarming.client.model.Field;
import org.openide.util.NbBundle;

/**
 *
 * @author timon
 */
public class SceneTestFrame extends javax.swing.JFrame {
    
    private final GeoEditorController controller = new GeoEditorController();

    /** Creates new form SceneTestFrame */
    public SceneTestFrame() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(new Dimension(400, 400));
        setLayout(new BorderLayout());
        setName(NbBundle.getMessage(GeoEditorTopComponent.class, "CTL_GeoEditorTopComponent"));
        
        JScrollPane scrollPane = new JScrollPane();
        add(scrollPane);
        scrollPane.setViewportView(controller.getView());
        
        Field field = new Field();  
        field.setWKT("MULTIPOLYGON (((7.092313220457739 53.08222790951966, 7.0935897718956324 53.07911809874443, 7.0845397978056095 53.07786941143708, 7.085181726005961 53.08123928498481, 7.085233003861471 53.08128810285453, 7.092313220457739 53.08222790951966)))");
        
        controller.edit(field);

    }


    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new SceneTestFrame().setVisible(true);
            }
        });
    }
}
